import tensorflow as tf
import os
from common import show_picture

if __name__ == '__main__':
    image_path = './lenna.png'

    # 读取图片数据
    image = tf.io.read_file(image_path)
    image = tf.image.decode_png(image)

    show_picture(image, 'lenna.png')

    flip_left_right_image =  tf.image.flip_left_right(image)
    show_picture(flip_left_right_image, 'flip_left_right_image_lenna.png')

    flip_up_down_image =  tf.image.flip_up_down(image)
    show_picture(flip_up_down_image, 'flip_up_down_image_lenna.png')
